import { TdtImageryLayerProvider } from './provider/TdtImageryLayerProvider'
import { register } from "../../utils/Layer";
import { BaseTileLayer } from './BaseTileLayer'


export class TdtLayer extends BaseTileLayer {
  //构建ImageryProvider
  _createImageryProvider(options) {
    return createImageryProvider(options)
  }
}

function createImageryProvider(options) {
  return new TdtImageryLayerProvider(options)
}

/**
 * 创建用于图层的 ImageryProvider对象
 *
 * @param {Object} options Provider参数，同图层构造参数。
 * @return {*} ImageryProvider类
 * @function
 */
TdtLayer.createImageryProvider = createImageryProvider

//注册下
const layerType = 'tdt' //图层类型
register(layerType, TdtLayer)
